package chpt02;

public class LoopDemo01 {

	public static void main(String[] args) {
		 int sum = 0; // 变量sum保存累加和
		 for(int x=1; x<=4; x++){
		    sum += x;
		 }
		 System.out.println("1-4累加和为："+sum);


	}

}
